<template>
  <div class="tab_company_out" id="print_container" style="width: 100%;">
    <h3 style="text-align: center">{{ formInline.shop_name }}</h3>
    <div>
      <span>分店：</span>
      <span>{{ branch_name }}</span>
    </div>
    <div style="width: 50%;float: left">营业员：{{ sales_name }}</div>
    <div style="width: 50%;float: right">收营员：{{ cashier_name }}</div>
    <div style="width: 60%;float: left">NO： {{ code }}</div>
    <div style="width: 40%;float: right">{{ time }}</div>
    <div>------------------------------------</div>
    <div class="section4">
      <div>
        <table style="width: 100%;" id="productTable">
          <thead>
          <tr>
            <td width="60%">货号/品名</td>
            <td width="20%">单价</td>
            <td width="10%">数量</td>
            <td width="10%">小计</td>
          </tr>
          </thead>
          <tbody>
          <tr v-for="(item, index) in goodsObj" :key="index">
            <td>{{ item.item_no }} / {{ item.major_product }}</td>
            <td>{{ item.price }}</td>
            <td>{{ item.number }}</td>
            <td>{{ item.number * item.price }}</td>
          </tr>
          </tbody>
        </table>
      </div>
    </div>
    <div>------------------------------------</div>
    <div>
      <div style="width: 60%;float: left">数量：{{ count }}</div>
      <div style="width: 40%;float: right">合计：{{ sum }}</div>
    </div>
    <div>
      <span>支付方式：微信</span>
    </div>
    <div>------------------------------------</div>
    <div>{{ formInline.shop_address }}</div>
    <div>-------------------------------------</div>
  </div>
</template>

<script>
export default {
  name: "pritnt",
  props: {
    formInline: {},
    code: "",
    time:"",
    goodsObj: []
  }
}
</script>

<style scoped>
* {
 padding: 0;
 margin: 0;
 list-style-type: none;
 font-family: "微软雅黑";
 font-size: 12px;
}

.tab_company_out {
 text-align: center;
 width: 100%;
 margin: auto;
 page-break-after: always;
}

h3 {
 font-size: 14px;
}

.dan {
 text-align: center;
 position: relative;
}

.dan span {
 position: absolute;
 right: 0;
}

p {
 overflow: hidden;
 padding: 10px 0;
}

p span {
 float: left;
}

p span ins {
 text-decoration: underline;
}

p time {
 float: right;
}

table {
 width: 100%;
 border: none;
 border-bottom: 1px solid #000;
}

table tr td {
 border: 1px solid #000;
 border-bottom: none;
 border-right: none;
 height: 20px;
 line-height: 20px;
}

table tr td:last-of-type,
table tr th:last-of-type {
 border-right: 1px solid #000;
}

table tr th {
 border-top: 1px solid #000;
 border-left: 1px solid #000;
 height: 22px;
 line-height: 22px;
 font-size: 12px;
}

table tr th:nth-child(2) {
 width: 0;
}

.lu {
 display: inline-block;
 padding-top: 10px;
}

.lu li {
 float: left;
 text-align: left;
 margin-right: 15px;
}

.lu li label {
 width: 100px;
 display: inline-block;
}

.lu li:last-of-type {
 margin-right: 0;
}

@page{
 size: auto A4 landscape;
 margin: 3mm;
}
</style>